export const formMixin = {
  methods: {
    validateAndEmit() {
      if (this.$refs.ztFormValidate&& typeof this.$refs.ztFormValidate.validate === 'function') {
        this.$refs.ztFormValidate.validate((valid) => {
          if (valid) {
            this.manageData('save', this.formData);
          } else {
            this.$message.error('请完整填写表单');
          }
        });
      }else {
        this.manageData('save', this.formData);
      }
    },
  },
};
